package FrameN;

import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.FlowLayout;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import net.miginfocom.swing.MigLayout;

import javax.swing.AbstractButton;
import javax.swing.ButtonGroup;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.JRadioButton;
import javax.swing.JComboBox;

import danhmuc.NhanVien;

public class FNNhanVien extends JDialog {

	private final JPanel contentPanel = new JPanel();
	private JTextField textField;
	private JTextField textField_1;
	private JTextField txtVTrCalendar;
	private JTextField textField_2;
	private JTextField textField_3;
	private JTextField textField_4;
	private JTextField textField_5;
	private Component rdbtnN;
	private JRadioButton rdbtnNam;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		try {
			FNNhanVien dialog = new FNNhanVien(null);
			dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
			dialog.setVisible(true);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	/**
	 * Create the dialog.
	 * @param nhanVien 
	 */
	public FNNhanVien(NhanVien nhanVien) {
		setBounds(100, 100, 450, 300);
		getContentPane().setLayout(new BorderLayout());
		contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
		getContentPane().add(contentPanel, BorderLayout.CENTER);
		contentPanel.setLayout(new MigLayout("", "[][grow]", "[25][25][25][25][25][25][25][25]"));
		{
			JLabel lblMNhnVin = new JLabel("Mã Nhân Viên");
			contentPanel.add(lblMNhnVin, "cell 0 0,alignx trailing");
		}
		{
			textField = new JTextField();
			contentPanel.add(textField, "flowx,cell 1 0,growx");
			textField.setColumns(10);
		}
		{
			JLabel lblTnNhnVin = new JLabel("Tên Nhân Viên");
			contentPanel.add(lblTnNhnVin, "cell 0 1,alignx trailing");
		}
		{
			textField_1 = new JTextField();
			contentPanel.add(textField_1, "cell 1 1,growx");
			textField_1.setColumns(10);
		}
		{
			JLabel lblNgySinh = new JLabel("Ngày sinh");
			contentPanel.add(lblNgySinh, "cell 0 2,alignx trailing");
		}
		{
			txtVTrCalendar = new JTextField();
			txtVTrCalendar.setText("vị trí calendar");
			contentPanel.add(txtVTrCalendar, "cell 1 2,growx");
			txtVTrCalendar.setColumns(10);
		}
		{
			JLabel lblaCh = new JLabel("Địa Chỉ");
			contentPanel.add(lblaCh, "cell 0 3,alignx trailing");
		}
		{
			textField_2 = new JTextField();
			contentPanel.add(textField_2, "cell 1 3,growx");
			textField_2.setColumns(10);
		}
		{
			JLabel lblinThoi = new JLabel("Điện Thoại");
			contentPanel.add(lblinThoi, "cell 0 4,alignx trailing");
		}
		{
			textField_3 = new JTextField();
			contentPanel.add(textField_3, "cell 1 4,growx");
			textField_3.setColumns(10);
		}
		{
			JLabel lblEmail = new JLabel("Email");
			contentPanel.add(lblEmail, "cell 0 5,alignx trailing");
		}
		{
			textField_4 = new JTextField();
			contentPanel.add(textField_4, "cell 1 5,growx");
			textField_4.setColumns(10);
		}
		{
			JLabel lblSTiKhon = new JLabel("Số Tài Khoản");
			contentPanel.add(lblSTiKhon, "cell 0 6,alignx trailing");
		}
		{
			textField_5 = new JTextField();
			contentPanel.add(textField_5, "cell 1 6,growx");
			textField_5.setColumns(10);
		}
		{
			JLabel lblVaiTrQun = new JLabel("Vai trò quản lý ");
			contentPanel.add(lblVaiTrQun, "cell 0 7,alignx trailing");
		}
		{
			JComboBox comboBox = new JComboBox();
			contentPanel.add(comboBox, "cell 1 7,growx");
		}
		{
			rdbtnNam = new JRadioButton("Nam",true);
			contentPanel.add(rdbtnNam, "cell 1 0");
		}
		{
			rdbtnN = new JRadioButton("Nữ",true);
			contentPanel.add(rdbtnN, "cell 1 0");
		}
			ButtonGroup groupgioitinh = new ButtonGroup();
			groupgioitinh.add(rdbtnNam);
			groupgioitinh.add((AbstractButton) rdbtnN);
		{
			JPanel buttonPane = new JPanel();
			buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
			getContentPane().add(buttonPane, BorderLayout.SOUTH);
			{
				JButton okButton = new JButton("OK");
				okButton.setActionCommand("OK");
				buttonPane.add(okButton);
				getRootPane().setDefaultButton(okButton);
			}
			{
				JButton cancelButton = new JButton("Cancel");
				cancelButton.setActionCommand("Cancel");
				buttonPane.add(cancelButton);
			}
		}
	}

}
